package net.yx;

import com.obs.services.ObsClient;

import java.io.ByteArrayInputStream;
import java.io.IOException;

/**
 * @author: NMY
 * @Date: 2021/8/18
 * @Time: 9:14
 */
public class TTT {
    public static void main(String[] args) throws IOException {

        okhttp3.RequestBody dd;
        String endPoint = "obs.cn-north-1.myhuaweicloud.com";
        String ak = "WLXBOAKTZJE7EKKOINAA";
        String sk = "CBe5pHyzPmCbwp0qDE1fYeh5U2oKXBpOFnXyI1mi";
// 创建ObsClient实例
        ObsClient obsClient = new ObsClient(ak, sk, endPoint);

// 使用访问OBS
        obsClient.putObject("sae", "my-key-1", new ByteArrayInputStream("Hello OBS".getBytes()));
// 关闭obsClient
        obsClient.close();

    }
}
